$(function(){
	i = 0
	$('.grid').hover(function(){
		i = $(this).index();
		$('.imgholder-box').eq(i).fadeIn(300).siblings().remove('.imgholder-box');;
	},function(){
		$('.imgholder-box').eq(i).fadeOut(10);
	})
})

$(function() {
				/*
				var footerSmall = document.querySelector('.footer-small');
				//  文档总共高度(scrollHeight) = 滚动过的高度(scrollTop) + 屏幕的可见高度(clientHeight)
				var scrollHeight = document.body.scrollHeight || document.documentElement.scrollHeight;
				var browserHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
				window.onscroll = function() {
					var scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
					if(scrollHeight - (scrollTop + browserHeight) <= 50) {
						var child = document.getElementById("loading");
						var parent = child.parentNode;
						var remoteData = document.querySelectorAll('#remoteData div');
						for (var i = 0; i < remoteData.length; i++) {
							parent.insertBefore(remoteData[i], child);
						}
						scrollHeight = document.body.scrollHeight || document.documentElement.scrollHeight;
					}
				}
				*/

				
				//var footerSmall = $('.footer-small');
				$(window).scroll(function() {
					if($(document).height() - ($(window).scrollTop() + $(window).height()) <= 50) {
						$('#loading').before($('').html());	
					}
				});
				
			})